package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.hr.entity.CompanyDO;

import javax.validation.constraints.NotNull;

import java.util.List;

import static org.jsola.hr.example.SaleUserExample.E_REGION;
import static org.jsola.hr.example.SaleUserExample.E_REMARK;
import static org.jsola.hr.example.SaleUserExample.E_SALE_BANK_CARD;
import static org.jsola.hr.example.SaleUserExample.E_SALE_GROUP_ID;
import static org.jsola.hr.example.SaleUserExample.E_SALE_ID_CARD;
import static org.jsola.hr.example.SaleUserExample.E_SALE_NAME;
import static org.jsola.hr.example.SaleUserExample.E_SALE_PHONE;
import static org.jsola.hr.example.SaleUserExample.E_SALE_USER_ID;
import static org.jsola.hr.example.SaleUserExample.M_REGION_MAX;
import static org.jsola.hr.example.SaleUserExample.M_REMARK_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_BANK_CARD_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_GROUP_ID_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_GROUP_ID_NOT_NULL;
import static org.jsola.hr.example.SaleUserExample.M_SALE_ID_CARD_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_NAME_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_NAME_NOT_NULL;
import static org.jsola.hr.example.SaleUserExample.M_SALE_PHONE_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_PHONE_NOT_NULL;
import static org.jsola.hr.example.SaleUserExample.M_SALE_USER_ID_MAX;
import static org.jsola.hr.example.SaleUserExample.M_SALE_USER_ID_NOT_NULL;
import static org.jsola.hr.example.SaleUserExample.N_REGION;
import static org.jsola.hr.example.SaleUserExample.N_REMARK;
import static org.jsola.hr.example.SaleUserExample.N_SALE_BANK_CARD;
import static org.jsola.hr.example.SaleUserExample.N_SALE_GROUP_ID;
import static org.jsola.hr.example.SaleUserExample.N_SALE_ID_CARD;
import static org.jsola.hr.example.SaleUserExample.N_SALE_NAME;
import static org.jsola.hr.example.SaleUserExample.N_SALE_PHONE;
import static org.jsola.hr.example.SaleUserExample.N_SALE_USER_ID;

/**
 * 销售人员
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【销售人员】的参数")
@Data
public class SaleUserAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SALE_USER_ID, example = E_SALE_USER_ID, required = true)
    @NotNull(message = M_SALE_USER_ID_NOT_NULL)
    @Length(max = 32, message = M_SALE_USER_ID_MAX)
    private String saleUserId;

    @ApiModelProperty(notes = N_SALE_NAME, example = E_SALE_NAME, required = true)
    @NotNull(message = M_SALE_NAME_NOT_NULL)
    @Length(max = 50, message = M_SALE_NAME_MAX)
    private String saleName;

    @ApiModelProperty(notes = N_SALE_PHONE, example = E_SALE_PHONE, required = true)
    @NotNull(message = M_SALE_PHONE_NOT_NULL)
    @Length(max = 11, message = M_SALE_PHONE_MAX)
    private String salePhone;

    @ApiModelProperty(notes = N_SALE_BANK_CARD, example = E_SALE_BANK_CARD)
    @Length(max = 19, message = M_SALE_BANK_CARD_MAX)
    private String saleBankCard;

    @ApiModelProperty(notes = N_SALE_ID_CARD, example = E_SALE_ID_CARD)
    @Length(max = 18, message = M_SALE_ID_CARD_MAX)
    private String saleIdCard;

    @ApiModelProperty(notes = N_SALE_GROUP_ID, example = E_SALE_GROUP_ID, required = true)
    @NotNull(message = M_SALE_GROUP_ID_NOT_NULL)
    @Length(max = 32, message = M_SALE_GROUP_ID_MAX)
    private String saleGroupId;

    @ApiModelProperty(notes = N_REGION, example = E_REGION)
    @Length(max = 50, message = M_REGION_MAX)
    private String region;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = "用工单位列表")
    private List<CompanyDO> companyList;
}

